let api_config = {
	list: {
		url: "",
		action: 'users_getList',
		method: "get"
	},
	add: {
		url: "",
		action: "",
		method: "get"
	},
	edit: {
		url: "",
		action: "",
		method: "get",
		id_field: "id",
		is_query_detail: true
	},
	delete: {
		url: "",
		action: "users_delUsers",
		method: "get",
		id_field: "id",
	},
	detail: {
		url: "",
		action: "users_detail",
		method: "get",
		id_field: "id",
	},
}


let column_params = {
	"id": "",
	"sn": "",
	"nickname": "",
	"email": "",
	"phone": "",
	"sex": "",
	//"birthday": "",
	"type": "",
	//"areaId": "",
	//"province": "",
	//"city": "",
	//"address": "",
	"level": "",
	"mendianId": "",
	"renzheng": "",
	"renzhengMsg": "",
	"zhekou": "",
	"createdTime": "",
	"updatedTime": "",
	"lastLogin": "",
	"userStatus": "",
	"commission": "",
	"costCommission": "",
	"money": "",
	"costMoney": "",
	"jifen": "",
	"costJifen": "",
	"image": "",
	"miniOpenId": "",
	"gzhOpenId": "",
	"wxUnionid": "",
	"tuanId": "",
	"ifTuanzhang": "",
	"ifModify": "",
	"shangji": "",
	"shangshangji": "",
	"appletInfo": "",
	"verifyCode": "",
	"tokenTime": "",
	"realName": "",
	"identityId": "",
	"identityBack": "",
	"identityFront": "",
	"qrCode": ""
}


let columns = [{
	"sort_in_form": "",
	"field": "id",
	"field_title": "ID",
	"table_width": "auto",
	"table_render_type": "text",
	"form_render_type": "input",
	"is_hidden_in_table": false,
	"is_hidden_in_form": false,
	"is_required_in_form": false
},
{
	"sort_in_form": "",
	"field": "image",
	"field_title": "头像",
	"table_width": "auto",
	"table_render_type": "image",
	"form_render_type": "image",
	"is_hidden_in_table": false,
	"is_hidden_in_form": false,
	"is_required_in_form": false
},
{
	"sort_in_form": "",
	"field": "nickname",
	"field_title": "昵称",
	"table_width": "150",
	"table_render_type": "text",
	"form_render_type": "input",
	"is_hidden_in_table": false,
	"is_hidden_in_form": false,
	"is_required_in_form": false
},
{
	"sort_in_form": "",
	"field": "phone",
	"field_title": "手机号",
	"table_width": "100",
	"table_render_type": "text",
	"form_render_type": "input",
	"is_hidden_in_table": false,
	"is_hidden_in_form": false,
	"is_required_in_form": false
}, {
	"sort_in_form": "",
	"field": "sex",
	"field_title": "性别",
	"table_width": "auto",
	"table_render_type": "tag",
	"form_render_type": "input",
	"is_hidden_in_table": true,
	"is_hidden_in_form": false,
	"is_required_in_form": false
},/* {
	"sort_in_form": "",
	"field": "birthday",
	"field_title": "生日",
	"table_width": "100",
	"table_render_type": "text",
	"form_render_type": "input",
	"is_hidden_in_table": false,
	"is_hidden_in_form": false,
	"is_required_in_form": false
}, */
{
	"sort_in_form": "",
	"field": "email",
	"field_title": "email",
	"table_width": "auto",
	"table_render_type": "text",
	"form_render_type": "input",
	"is_hidden_in_table": true,
	"is_hidden_in_form": false,
	"is_required_in_form": false
},
{
	"sort_in_form": "",
	"field": "realName",
	"field_title": "真实姓名",
	"table_width": "auto",
	"table_render_type": "text",
	"form_render_type": "input",
	"is_hidden_in_table": false,
	"is_hidden_in_form": false,
	"is_required_in_form": false
}, {
	"sort_in_form": "",
	"field": "identityId",
	"field_title": "身份证号",
	"table_width": "auto",
	"table_render_type": "text",
	"form_render_type": "input",
	"is_hidden_in_table": true,
	"is_hidden_in_form": false,
	"is_required_in_form": false
}, {
	"sort_in_form": "",
	"field": "identityBack",
	"field_title": "身份证背面",
	"table_width": "auto",
	"table_render_type": "text",
	"form_render_type": "input",
	"is_hidden_in_table": true,
	"is_hidden_in_form": false,
	"is_required_in_form": false
}, {
	"sort_in_form": "",
	"field": "identityFront",
	"field_title": "身份证正面",
	"table_width": "auto",
	"table_render_type": "text",
	"form_render_type": "input",
	"is_hidden_in_table": true,
	"is_hidden_in_form": false,
	"is_required_in_form": false
},
{
	"sort_in_form": "",
	"field": "type",
	"field_title": "类型",
	"table_width": "auto",
	"table_render_type": "text",
	"form_render_type": "input",
	"is_hidden_in_table": true,
	"is_hidden_in_form": true,
	"is_required_in_form": false
},

{
	"sort_in_form": "",
	"field": "province",
	"field_title": "省份",
	"table_width": "auto",
	"table_render_type": "text",
	"form_render_type": "input",
	"is_hidden_in_table": true,
	"is_hidden_in_form": false,
	"is_required_in_form": false
},
{
	"sort_in_form": "",
	"field": "city",
	"field_title": "城市",
	"table_width": "auto",
	"table_render_type": "text",
	"form_render_type": "input",
	"is_hidden_in_table": true,
	"is_hidden_in_form": true,
	"is_required_in_form": false
},
/* {
	"sort_in_form": "",
	"field": "address",
	"field_title": "地址",
	"table_width": "auto",
	"table_render_type": "text",
	"form_render_type": "input",
	"is_hidden_in_table": false,
	"is_hidden_in_form": false,
	"is_required_in_form": false
}, */
{
	"sort_in_form": "",
	"field": "areaId",
	"field_title": "地区",
	"table_width": "auto",
	"table_render_type": "text",
	"form_render_type": "input",
	"is_hidden_in_table": true,
	"is_hidden_in_form": false,
	"is_required_in_form": false
},
{
	"sort_in_form": "",
	"field": "type",
	"field_title": "分销等级",
	"table_width": "auto",
	"table_render_type": "tag",
	"form_render_type": "input",
	"is_hidden_in_table": false,
	"is_hidden_in_form": false,
	"is_required_in_form": false
},
{
	"sort_in_form": "",
	"field": "shangjiDesc",
	"field_title": "上级",
	"table_width": "150",
	"table_render_type": "text",
	"form_render_type": "input",
	"is_hidden_in_table": false,
	"is_hidden_in_form": false,
	"is_required_in_form": false
},
// {
// 	"sort_in_form": "",
// 	"field": "mendianId",
// 	"field_title": "门店",
// 	"table_width": "auto",
// 	"table_render_type": "text",
// 	"form_render_type": "input",
// 	"is_hidden_in_table": false,
// 	"is_hidden_in_form": false,
// 	"is_required_in_form": false
// }, 
{
	"sort_in_form": "",
	"field": "renzheng",
	"field_title": "认证",
	"table_width": "auto",
	"table_render_type": "tag",
	"form_render_type": "input",
	"is_hidden_in_table": false,
	"is_hidden_in_form": false,
	"is_required_in_form": false
},
{
	"sort_in_form": "",
	"field": "renzhengMsg",
	"field_title": "认证状态",
	"table_width": "auto",
	"table_render_type": "text",
	"form_render_type": "input",
	"is_hidden_in_table": true,
	"is_hidden_in_form": false,
	"is_required_in_form": false
},
/* {
	"sort_in_form": "",
	"field": "zhekou",
	"field_title": "会员折扣",
	"table_width": "auto",
	"table_render_type": "text",
	"form_render_type": "input",
	"is_hidden_in_table": false,
	"is_hidden_in_form": false,
	"is_required_in_form": false
}, */
{
	"sort_in_form": "",
	"field": "commission",
	"field_title": "佣金",
	"table_width": "auto",
	"table_render_type": "text",
	"form_render_type": "input",
	"is_hidden_in_table": false,
	"is_hidden_in_form": false,
	"is_required_in_form": false
}, {
	"sort_in_form": "",
	"field": "costCommission",
	"field_title": "累计佣金",
	"table_width": "auto",
	"table_render_type": "text",
	"form_render_type": "input",
	"is_hidden_in_table": false,
	"is_hidden_in_form": false,
	"is_required_in_form": false
}, {
	"sort_in_form": "",
	"field": "money",
	"field_title": "余额",
	"table_width": "auto",
	"table_render_type": "text",
	"form_render_type": "input",
	"is_hidden_in_table": false,
	"is_hidden_in_form": false,
	"is_required_in_form": false
}, {
	"sort_in_form": "",
	"field": "costMoney",
	"field_title": "累计余额",
	"table_width": "auto",
	"table_render_type": "text",
	"form_render_type": "input",
	"is_hidden_in_table": false,
	"is_hidden_in_form": false,
	"is_required_in_form": false
}, /* {
	"sort_in_form": "",
	"field": "jifen",
	"field_title": "积分",
	"table_width": "auto",
	"table_render_type": "text",
	"form_render_type": "input",
	"is_hidden_in_table": false,
	"is_hidden_in_form": false,
	"is_required_in_form": false
}, {
	"sort_in_form": "",
	"field": "costJifen",
	"field_title": "累计积分",
	"table_width": "auto",
	"table_render_type": "text",
	"form_render_type": "input",
	"is_hidden_in_table": false,
	"is_hidden_in_form": false,
	"is_required_in_form": false
}, */
// {
// 	"sort_in_form": "",
// 	"field": "miniOpenId",
// 	"field_title": "小程序openId",
// 	"table_width": "auto",
// 	"table_render_type": "text",
// 	"form_render_type": "input",
// 	"is_hidden_in_table": true,
// 	"is_hidden_in_form": false,
// 	"is_required_in_form": false
// }, 
// {
// 	"sort_in_form": "",
// 	"field": "gzhOpenId",
// 	"field_title": "公众号openId",
// 	"table_width": "auto",
// 	"table_render_type": "text",
// 	"form_render_type": "input",
// 	"is_hidden_in_table": true,
// 	"is_hidden_in_form": false,
// 	"is_required_in_form": false
// }, 
// {
// 	"sort_in_form": "",
// 	"field": "wxUnionid",
// 	"field_title": "微信unionid",
// 	"table_width": "auto",
// 	"table_render_type": "text",
// 	"form_render_type": "input",
// 	"is_hidden_in_table": true,
// 	"is_hidden_in_form": false,
// 	"is_required_in_form": false
// }, 
// {
// 	"sort_in_form": "",
// 	"field": "tuanId",
// 	"field_title": "",
// 	"table_width": "auto",
// 	"table_render_type": "text",
// 	"form_render_type": "input",
// 	"is_hidden_in_table": true,
// 	"is_hidden_in_form": false,
// 	"is_required_in_form": false
// }, 
// {
// 	"sort_in_form": "",
// 	"field": "ifTuanzhang",
// 	"field_title": "是否团长",
// 	"table_width": "auto",
// 	"table_render_type": "text",
// 	"form_render_type": "input",
// 	"is_hidden_in_table": true,
// 	"is_hidden_in_form": false,
// 	"is_required_in_form": false
// }, 
{
	"sort_in_form": "",
	"field": "ifModify",
	"field_title": "",
	"table_width": "auto",
	"table_render_type": "text",
	"form_render_type": "input",
	"is_hidden_in_table": true,
	"is_hidden_in_form": false,
	"is_required_in_form": false
},
{
	"sort_in_form": "",
	"field": "shangji",
	"field_title": "上级",
	"table_width": "auto",
	"table_render_type": "text",
	"form_render_type": "input",
	"is_hidden_in_table": true,
	"is_hidden_in_form": false,
	"is_required_in_form": false
},
{
	"sort_in_form": "",
	"field": "shangshangji",
	"field_title": "上上级",
	"table_width": "auto",
	"table_render_type": "text",
	"form_render_type": "input",
	"is_hidden_in_table": true,
	"is_hidden_in_form": false,
	"is_required_in_form": false
},
{
	"sort_in_form": "",
	"field": "appletInfo",
	"field_title": "",
	"table_width": "auto",
	"table_render_type": "text",
	"form_render_type": "input",
	"is_hidden_in_table": true,
	"is_hidden_in_form": false,
	"is_required_in_form": false
},
{
	"sort_in_form": "",
	"field": "verifyCode",
	"field_title": "",
	"table_width": "auto",
	"table_render_type": "text",
	"form_render_type": "input",
	"is_hidden_in_table": true,
	"is_hidden_in_form": false,
	"is_required_in_form": false
},
// {
// 	"sort_in_form": "",
// 	"field": "tokenTime",
// 	"field_title": "",
// 	"table_width": "auto",
// 	"table_render_type": "text",
// 	"form_render_type": "input",
// 	"is_hidden_in_table": true,
// 	"is_hidden_in_form": false,
// 	"is_required_in_form": false
// }, 
// {
// 	"sort_in_form": "",
// 	"field": "qrCode",
// 	"field_title": "二维码",
// 	"table_width": "auto",
// 	"table_render_type": "text",
// 	"form_render_type": "input",
// 	"is_hidden_in_table": true,
// 	"is_hidden_in_form": false,
// 	"is_required_in_form": false
// }

{
	"sort_in_form": "",
	"field": "userStatus",
	"field_title": "用户状态",
	"table_width": "auto",
	"table_render_type": "tag",
	"form_render_type": "input",
	"is_hidden_in_table": false,
	"is_hidden_in_form": false,
	"is_required_in_form": false
}, {
	"sort_in_form": "",
	"field": "createdTime",
	"field_title": "注册时间",
	"table_width": "150",
	"table_render_type": "text",
	"form_render_type": "input",
	"is_hidden_in_table": false,
	"is_hidden_in_form": false,
	"is_required_in_form": false
},
{
	"sort_in_form": "",
	"field": "updatedTime",
	"field_title": "更新时间",
	"table_width": "150",
	"table_render_type": "text",
	"form_render_type": "input",
	"is_hidden_in_table": false,
	"is_hidden_in_form": false,
	"is_required_in_form": false
}, {
	"sort_in_form": "",
	"field": "lastLogin",
	"field_title": "最近一次登录",
	"table_width": "150",
	"table_render_type": "text",
	"form_render_type": "input",
	"is_hidden_in_table": false,
	"is_hidden_in_form": false,
	"is_required_in_form": false
},
]

let table_columns = columns.filter(v => !v.is_hidden_in_table).map(v => ({
	...v
}))
// [
//     // {
//     //     column: "postId",//字段属性名
//     //     field_title: "ID", //字段标题
//     //     table_width: "auto",//表格宽度
//     //     column_sortable: false, //表格是否可排序
//     //     column_show_overflow_tooltip: false, //表格悬浮是否展示提示
//     //     table_render_type: '',//表格展示类型   '' || text || tag || image || image-list || file
//     // },
// ]

let form_fields = columns.filter(v => !v.is_hidden_in_form).map(v => ({
	...v
}))

// 表单默认值
let form_fields_default_value = {
	// "id": "",
	// "title": "",
	// "parentId": 0,
	// "ordering": 0,
	// "thumb": "",
	// "description": ""
}

// [
//     //【form_render_type 类型列表】
//     //input 默认
//     //number 文字输入
//     //textarea 文本域
//     //date 日期
//     //select 下拉选
//     //radio 单选
//     //cascader 级联选择
//     //upload-image 上传图片
//     //upload-file 上传文件
//     //rich-editor 富文本编辑器
//     //topic-card 话题卡片
//     {
//         column: "postId",
//         field_title: "ID",
//         is_required: 1,
//         form_render_type: "ID", //'' || text || tag || image || image-list || file
//         //选项型数据
//         // labelKey: "channelName",
//         // valueKey: "channelId",
//         // options: newsTypeOptions,

//         // 文件上传
//         // upload_multiple: true,
//         // upload_limit: 9,
//         // upload_tip: "(可上传多图，建议图片压缩后上传)",
//         // cache_key: "upload_cover_list", //图片上传回显
//         // saveFormat: "jsonObjectArray",
//     },
// ]


// console.log('字段配置 columns', JSON.parse(JSON.stringify(columns)))
console.log('表格配置 table_columns', JSON.parse(JSON.stringify(table_columns)))
console.log('表单配置 form_fields', JSON.parse(JSON.stringify(form_fields)))

// console.log('字段配置 columns', (JSON.stringify(columns)))
// console.log('表格配置 table_columns', (JSON.stringify(table_columns)))
// console.log('表单配置 form_fields', (JSON.stringify(form_fields)))




let table_row_actions = [
	{
		title: '审核',
		condition: { //展示条件
			field: 'renzheng',
			field_value: 1,
		},
	},
	{
		title: '详情',
	},
	{
		title: '删除',
		// action_type: 'custom'
	},
]


let radio_options_map = {
	userStatus: [{
		title: '正常',
		value: 1,
		type: '',
	},
	{
		title: '停用',
		value: 0,
		type: 'info',
	},
	],
	
	
	
	
	// isIndex: [{
	// 		title: '否',
	// 		value: 0,
	// 		type: 'info',
	// 	},
	// 	{
	// 		title: '是',
	// 		value: 1,
	// 		type: '',
	// 	}
	// ],
	renzheng: [{
		title: '未提交',
		value: 0,
		type: 'info',
	},
	{
		title: '待审核',
		value: 1,
		type: 'warning',
	},
	{
		title: '审核通过',
		value: 2,
		type: 'success',
	},
	{
		title: '审核失败',
		value: 3,
		type: 'info',
	},
	],
	type: [{
		title: '客户',
		value: 0,
		type: 'info',
	},
	{
		title: '二级代理',
		value: 1,
		type: 'warning',
	},
	{
		title: '一级代理',
		value: 2,
		type: 'warning',
	},
	{
		title: '业务员',
		value: 3,
		type: 'success',
	},],
}


// 上传配置
let upload_config_map = {
	// 'thumb': {
	// 	multiple: false,
	// 	limit: 1,
	// 	tip: '请选择文件',
	// },
	// 'images': {
	// 	multiple: true,
	// 	limit: 100,
	// 	tip: '请选择文件',
	// },
	// 'videoImg': {
	// 	multiple: false,
	// 	limit: 1,
	// 	tip: '请选择文件',
	// },
}




let tree_config_map = {

}


export default {
	api_config,
	table_columns,
	form_fields,
	form_fields_default_value,
	table_row_actions,
	radio_options_map,
	upload_config_map,
	tree_config_map,
};